package com.ruoyi.basic.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 定额工日/实际工日单价对象 tb_daily_unit_price
 * 
 * @author ruoyi
 * @date 2022-09-04
 */
@TableName("tb_daily_unit_price_detail")
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class TbDailyUnitPriceDetail extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    @TableId
    @TableField("`id`")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /** 分类ID */
    @Excel(name = "工日单价ID")
    @TableField("`unit_price_id`")
    @NotNull(message = "单价不能为空")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long unitPriceId;

    /** 分类ID */
    @Excel(name = "分类ID")
    @TableField("`category_id`")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @NotNull(message = "分类不能为空")
    private Long categoryId;

    /** 类型（1：定额工日单价 2：实际工日单价） */
    @Excel(name = "类型", readConverterExp = "1=：定额工日单价,2=：实际工日单价")
    @TableField("`type`")
    @NotNull(message = "类型不能为空")
    private Integer type;

    /** 分类名称 */
    @TableField(exist = false)
    private String categoryName;

    /** 最大单价 */
    @Excel(name = "最大单价")
    @TableField("`max_price`")
    @NotNull(message = "最大单价不能为空")
    private BigDecimal maxPrice;

    /** 最小单价 */
    @Excel(name = "最小单价")
    @TableField("`min_price`")
    @NotNull(message = "最小单价不能为空")
    private BigDecimal minPrice;

    /** 平均单价 */
    @Excel(name = "平均单价")
    @TableField("`avg_price`")
    @NotNull(message = "平均单价不能为空")
    private BigDecimal avgPrice;

}
